package com.zatech.cgnci.project.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 承保项目表
 * </p>
 *
 * @author Generator
 * @since 2024-12-17
 */
@Accessors(chain = true)
@TableName("cgnci_business_project")
@ApiModel(value = "CgnciBusinessMainDO对象", description = "承保项目表")
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class CgnciBusinessProjectDO implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("业务ID")
    @TableId(value = "project_id", type = IdType.ASSIGN_ID)
    private Long projectId;

    @ApiModelProperty("流程编号(关联cgnci_approval_info.formNo)")
    private String formNo;

    @ApiModelProperty("业务编号")
    private String projectNo;

    @ApiModelProperty("项目类型(1-新建项目,2-复制项目),码表值:projectType")
    private String projectType;

    @ApiModelProperty("复制项目的项目id(project_type =2必填) ")
    private Long originalProjectId;

    @ApiModelProperty("业务名称")
    private String projectName;

    @ApiModelProperty("业务英文名称")
    private String projectNameEn;

    @ApiModelProperty("险类")
    private String riskClass;

    @ApiModelProperty("险类代码")
    private String riskClassCode;

    @ApiModelProperty("险种")
    private String riskSubType;

    @ApiModelProperty("险种代码")
    private String riskSubTypeCode;

    @ApiModelProperty("起期")
    private Date startDate;

    @ApiModelProperty("止期")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT-8")
    private Date endDate;

    @ApiModelProperty("业务年度")
    private String projectYear;

    @ApiModelProperty("业务年度范围")
    private String projectYears;

    @ApiModelProperty("保险期限(天)")
    private Integer insuranceDays;

    @ApiModelProperty("币种")
    private String currency;

    @ApiModelProperty("汇率约定方式(1-按数值，2-按日期),码表值:exchangeRateType")
    private String exchangeRateType;

    @ApiModelProperty("汇率")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private BigDecimal exchangeRate;

    @ApiModelProperty("业务形式(1-比例,2-非比例),码表值:proportionalMode")
    private String projectForm;

    @ApiModelProperty("具体业务类型(1-成数,2-溢额,3-成数溢额混合,4-累计损失超赔,5-险位超赔,6-巨灾超赔),码表值:contractType")
    private String projectSubform;

    @ApiModelProperty("承保范围")
    private String coverageScope;

    @ApiModelProperty("承保地区,码表值:coverageArea")
    private String coverageArea;

    @ApiModelProperty("保费基础(1-净保费分出,2-毛保费分出),码表值:premiumBasis")
    private String premiumBasis;

    @ApiModelProperty("税种(1-增值税),码表值:taxType")
    private String taxType;

    @ApiModelProperty("税率(0-0.00,1-3.00,2-6.00),码表值:taxType")
    private String taxRate;

    @ApiModelProperty("PML")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private BigDecimal pml;

    @ApiModelProperty(value = "有无查勘报告(1-有；0-无),码表值:isHave")
    private String isSurveyReport;

    @ApiModelProperty("日期差异说明")
    private String dateDiffReason;

    @ApiModelProperty(value = "是否生效(1-是, 0-否),码表值:isYes")
    private String isEffective;

    @ApiModelProperty("是否镜像数据(1-是, 0-否),码表值:isYes")
    private String isMirror;

    @ApiModelProperty("状态(0:录入中,1:审核中,2:退回录入中,3:已完成,4:已注销,5:作废申请中,6:作废审核中,7:已作废),码表值:businessStatus")
    private String status;

    @ApiModelProperty("版本号")
    private Integer version;

    @ApiModelProperty("最新批单号")
    private String lastEndorsementNo;

    @ApiModelProperty("续保原保单号")
    private String originalPolicyNumber;

    @ApiModelProperty("业务承接类型(1-临分分入,2-预约临分分入,3-合约分入),码表值:projectAcceptanceType")
    private String projectAcceptanceType;

    @ApiModelProperty("分入日期")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT-8")
    private Date entryDate;

    @ApiModelProperty("备注")
    private String remark;

    @ApiModelProperty("作废原因")
    private String cancelReason;

    @ApiModelProperty("是否有pml附件(1-有；0-无),码表值:isHave")
    private String urveyReport;

    @ApiModelProperty("创建时间")
    private Date createTime;

    @ApiModelProperty("创建人")
    private String createUser;

    @ApiModelProperty("更新时间")
    @TableField(update = "now()")
    private Date updateTime;

    @ApiModelProperty("更新人")
    private String updateUser;


}
